<template>
  <div id="test">
    <div class="main">
      <Row>
        <!-- 大标题 -->
        <Col span="24" class="maxTitle">{{testinfo.maxTitle}}</Col>
      </Row>
      <Row>
        <Col span="24">
        <!-- 四行文字 -->
          {{testinfo.item1}}
          <br />
          {{testinfo.item2}}
          <br />
          <!-- 背景加黄 -->
          <span class="yellobackground">{{testinfo.item3}}</span>
          <br />
          {{testinfo.item4}}
        </Col>
      </Row>

      <div>
        <!-- 灯笼小人 -->
        <img :src="testinfo.img" class="people" />
      </div>
      <Row>
        <Col span="24">
        <!-- 黄色按钮 -->
          <Button
            type="warning"
            size="large"
            class="btnStratTest"
            @click="()=>{ this.modal = true}"
          >{{testinfo.btnText}}</Button>
          <!-- 弹出对话框 -->
          <Modal v-model="modal" title="提示" @on-ok="ok">
            <p>网页开发中...</p>
          </Modal>
        </Col>
      </Row>
    </div>
  </div>
</template>

<script>
//导入iview-ui组件
import { Row, Col, Button, Modal } from "view-design";

export default {
  name: "test",
  //组件注册
  components: {
    Row,
    Col,
    Button,
    Modal
  },
  //传入属性
  props:['testinfo'],
  data() {
    return {
      // 对话框显示变量切换
      modal: false,
      
    };
  },
  computed: {},
  watch: {},
  methods: {
    //对话框弹出事件
    ok() {}
  },
  created() {},
  mounted() {},
  beforeCreate() {}, //生命周期 - 创建之前
  beforeMount() {}, //生命周期 - 挂载之前
  beforeUpdate() {}, //生命周期 - 更新之前
  updated() {}, //生命周期 - 更新之后
  beforeDestroy() {}, //生命周期 - 销毁之前
  destroyed() {}, //生命周期 - 销毁完成
  activated() {} //如果页面有keep-alive缓存功能，这个函数会触发
};
</script>

<style scoped>
/* 局部UI样式修改 */
.main {
  font-size: 14px;
  text-align: center;
  line-height: 24px;
  padding: 70px 0 40px;
}
.maxTitle {
  font-size: 20px;
  padding-bottom: 30px;
}
.yellobackground {
  display: inline-block;
  background-color: #fee286;
  padding: 0 7px;
}
.btnStratTest {
  background-color: #fde021;
  border: none;
  color: black;
  padding: 0 40px;
  height: 36px;
  margin-top: -30px;
}
.people {
  position: relative;
  top: -119px;
  right: -90px;
}
</style>